<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <base href="<%=basePath%>">
    
    <title>修改游戏类型</title>
    
    <meta charset="utf-8"/>
	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="expires" content="0">    
	<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
	<meta http-equiv="description" content="This is my page">
	
	<link rel="stylesheet" href="gold/css/bootstrap.min.css">
	<link rel="stylesheet" href="gold/css/index.css" />
	<script src="gold/js/jquery.js"></script>
	<script src="gold/js/bootstrap.min.js"></script>
	<style type="text/css">
		#container {
			margin-top: -20px;
			margin-left: 10px;
		}
		td {
			vertical-align: middle !important;
		}
	</style>
	
  </head>
  
  <body>
    <div id="container">
		<div class="page-header text-center">
			<h2>修改对应省份游币兑换比例</h2>
		</div>
		<div class="row">
			<div class="col-xs-6 col-sm-4 col-md-offset-4">
				<form class="form-horizontal" action="updateExchange.do" 
					method="post" enctype="multipart/form-data">
					<table class="table table-bordered table-condensed ">
						<thead></thead>
						<tbody>
							<tr class="text-center">
								<td>省份名</td>
								<td>
									<div class="col-sm-4">
										<div class="radio">
											<input type="text" disabled="disabled" value="${exchange.exchangeProv}" name="exchangeProv"/>
										</div>
									</div>
								</td>
							</tr>
							<tr class="text-center">
								<td>兑换状态</td>
								<td>
									<div class="col-sm-4">
										<div class="radio">
											<c:forEach items="${exchangeStatusList}" var="exchangeStatus">
												<c:choose>
													<c:when test="${exchangeStatus.id == exchange.exchangeStatusId}">
														<label> 
															<input type="radio" name="exchangeStatusId" 
															value="${exchangeStatus.id}" checked="checked"> ${exchangeStatus.status} 
														</label> 
													</c:when>
													<c:otherwise>
														<label> 
															<input type="radio" name="exchangeStatusId" 
															value="${exchangeStatus.id}"> ${exchangeStatus.status} 
														</label> 
													</c:otherwise>
												</c:choose>
											</c:forEach>
										</div>
									</div></td>
							</tr>
							<tr class="text-center">
								<td>兑换比例</td>
								<td>
									<div class="col-sm-4">
										<div class="radio">
											<input type="text" value="${exchange.exchangeCharge}" name="exchangeChargeString"/>
										</div>
									</div></td>
							</tr>
						</tbody>
					</table>
					<div class="row">
						<div class="col-xs-6 col-sm-7">
							<div class="form-group">
								<div class="col-sm-offset-4 col-sm-4">
									<input type="submit" class="btn btn-primary" value="确认修改" />
								</div>
							</div>
						</div>
						<div class="col-xs-6 col-sm-4">
							<div class="form-group">
								<div class=" col-sm-11">
									<button class="btn btn-warning" onclick="goBack()">返回上一页</button>
								</div>
							</div>
						</div>
					</div>
					<input type="hidden" name="exchangeId" value="${exchange.exchangeId}"/>
					<input type="hidden" name="exchangeProvId" value="${exchange.exchangeProvId}"/>
				</form>

			</div>
		</div>
	</div>
  </body>
  <script type="text/javascript">
	  	function goBack(){
	  		window.history.back();
	  	}
  </script>
  	
</html>
